﻿using System;
using System.Collections.Generic;

namespace Camc.Quality.Bop.TreeObject
{
    public class TreeClass
    {
        /// <summary>
        /// id
        /// </summary>
        public Guid Id { get; set; }
        /// <summary>
        /// 节点名称
        /// </summary>
        public string NodeName { get; set; }
        /// <summary>
        /// 图号
        /// </summary>
        public string NodeDrawingNo { get; set; }
        /// <summary>
        /// 版本
        /// </summary>
        public string Edition { get; set; }
        /// <summary>
        /// 是否关联
        /// </summary>
        public int IsRelation { get; set; }
        /// <summary>
        /// 父ID
        /// </summary>
        public Guid ParentId { get; set; }

        public Guid? RtechniqueEntityId { get; set; } = null;
        /// <summary>
        /// 层级
        /// </summary>
        public int NodeLevel { get; set; }
        /// <summary>
        /// 父节点Code
        /// </summary>
        public string ParentCode { get; set; }
        /// <summary>
        /// 节点Code
        /// </summary>
        public string NodeCode { get; set; }
        /// <summary>
        /// 是否叶节点
        /// </summary>
        public int IsLeaf { get; set; }
        /// <summary>
        /// 是否导出
        /// </summary>
        public int IsExport { get; set; }

        /// <summary>
        /// 已导出Pad端Id
        /// </summary>
        public string PadId { get; set; }
        /// <summary>
        /// 已导出Pad端Name
        /// </summary>
        public string PadName { get; set; }
        /// <summary>
        /// 是否返回数据
        /// </summary>
        public int IsReturn { get; set; }
        /// <summary>
        /// 回传规程状态
        /// </summary>
        public string ReturnStatus { get; set; } = "";
        /// <summary>
        /// 规程状态
        /// </summary>
        public int Status { get; set; }



        /// <summary>
        /// children 
        /// </summary>
        public IList<TreeClass> children = new List<TreeClass>();
        public void Addchildren(TreeClass node)
        {
            this.children.Add(node);
        }
    }
}
